package com.zhkc.iess.online.test01.config;

import com.zhkc.iess.online.test01.handler.SubscribeHandler;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class SubscribeFactoryConfig {

    private static final Map<String, SubscribeHandler> map = new ConcurrentHashMap<>();

    public static SubscribeHandler getByName(String name) {
        return map.get(name);
    }

    public static void register(String name, SubscribeHandler perSon) {
        map.put(name, perSon);
    }
}